
<li class="layui-form-item" style="display:none">
    <label class="layui-form-label">微信接收</label>
    <div class="layui-input-block">
        <?php

        foreach($weixin_send_list as $value){?>
            <input type="checkbox" name="ai_weixin_send[]" value="<?php echo $value;?>" title="<?php echo $lang['weixin_send'][$value];?> " <? if(in_array($value , $weixin_send_action) ){echo "checked";} ?> >
        <?php }?>
    </div>
</li>

<?php
if($detail['open_id'] != ''){
    ?>
    <li class="layui-form-item">
        <label class="layui-form-label">解除绑定</label>
        <div class="layui-input-block">

            <input type="checkbox" name="jcbd" value="1" title="解除微信推送绑定" >

        </div>
    </li>
    <?php
}
else{
    ?>
    <li class="layui-form-item layui-form-text" >
        <label class="layui-form-label">微信二维码</label>
        <div class="layui-input-block">
            <?php
            $is_user = 0;

            $url='http://wx.enpingshi.com/usercenter.php?data=nid|'.$detail['nid'].'$type|qrcode$os_system|'.$dbName.'$is_user|'.$is_user.'$os|evo$table_prefix|'.$table_Prefix; //为防止微信跳转参数不会被删减，把原来的&换成$，=换成|来进行区分

            ?><br />
            <img src="<?php echo scerweima2($url);?>" />
        </div>
    </li>




    <script type="text/javascript">
        function check_qr(){
            layui.use('layer', function(){
                var layer = layui.layer;
                var index = '';

                $.ajax({
                    type:"POST",
                    url:"ajax_control.php?act=check_qr_bind",
                    data:{"nid":<? echo $detail['nid']?>},
                    dataType:"text",
                    success:function(data){

                        return_data = data.replace(/[\r\n]/g,"");
                        if(return_data == 1){
                            layer.msg('绑定成功！', {
                                    icon: 1,
                                    shade:true,
                                    time:2000,
                                    shade: [0.8, '#393D49']
                                },
                                function(){
                                    window.clearInterval(check_focus);
                                    window.location.reload()
                                });
                        }
                    }
                })
            });
        }

        var check_focus ;

        function check_input_focus(){
            window.clearInterval(check_focus);

            check_qr();
            check_focus = setInterval(check_input_focus,2000);

        }

        $(document).ready(function(e) {
            check_input_focus()
        });

    </script>

    <?php
}
?>
<hr/>
